set terminal epslatex

set output "case1.eps"
set output "case1.tex"
set size 0.8,0.8
set xlabel "x"
set ylabel "y"
set xrange[-3:6]
set yrange[-3:6]
set grid
set arrow from -3,0 to 6,0 nohead
set arrow from 0,-3 to 0,6 nohead
plot (x+1)*(x-3)+1 title "$y=x^2-2x-2$"

set output "case2.eps"
set output "case2.tex"
plot x*x-2*x+1 title "$y=x^2-2x+1$"

set output "case3.eps"
set output "case3.tex"
plot x*x-2*x+2 title "$y=x^2-2x+2$"
